/*
 * Nitobi Complete UI 1.0
 * Copyright(c) 2008, Nitobi
 * support@nitobi.com
 * 
 * http://www.nitobi.com/license
 */
if(typeof (nitobi)=="undefined"||typeof (nitobi.lang)=="undefined"){
alert("The Nitobi framework source could not be found. Is it included before any other Nitobi components?");
}
nitobi.lang.defineNs("nitobi.callout");
if(false){
nitobi.callout=function(){
};
}
nitobi.callout.lastStyle="";
nitobi.callout.Callout=function(_1,_2,_3){
this.uid=Math.random().toString().replace(".","").replace("0","");
nitobi.callout.Callout.refs[nitobi.callout.Callout.refs.length]=this;
this.attributesTimer=null;
this.ver="1.11";
this.titlehtml="";
this.stylesheet="xp";
this.allowOffScreen=true;
if(_1!=null){
this.stylesheet=_1.toLowerCase();
}
this.Is=function(){
this.opera=false;
_4=navigator.userAgent.toLowerCase();
this.major=parseInt(navigator.appVersion);
this.minor=parseFloat(navigator.appVersion);
this.firefox=false;
if(navigator.userAgent.indexOf("Firefox")!=-1){
this.firefox=true;
}
this.ns=((_4.indexOf("mozilla")!=-1)&&(_4.indexOf("spoofer")==-1)&&(_4.indexOf("compatible")==-1)&&(_4.indexOf("opera")==-1)&&(_4.indexOf("webtv")==-1)&&(_4.indexOf("hotjava")==-1));
this.ns2=(this.ns&&(this.major==2));
this.ns3=(this.ns&&(this.major==3));
this.ns4=(this.ns&&(this.major==4));
this.ns6=(this.ns&&(this.major>=5));
this.ie=((_4.indexOf("msie")!=-1)&&(_4.indexOf("opera")==-1));
this.ie3=(this.ie&&(this.major<4));
this.ie4=(this.ie&&(this.major==4)&&(_4.indexOf("msie 4")!=-1));
this.ie5=(this.ie&&(this.major==4)&&(_4.indexOf("msie 5.")!=-1)&&(_4.indexOf("msie 5.5")==-1)&&(_4.indexOf("mac")==-1));
this.ie6=(this.ie&&(this.major==4)&&(_4.indexOf("msie 6.")!=-1));
this.ie7=(this.ie&&(this.major==4)&&(_4.indexOf("msie 7.0")!=-1));
if(_4.indexOf("opera")==0){
this.opera=true;
}
};
var _4=navigator.userAgent.toLowerCase();
if(_4.indexOf("opera")==0){
this.opera=true;
}
if(_4.indexOf("Firefox")!=-1){
this.firefox=true;
}
if(_4.indexOf("msie")==0){
this.ie=true;
}
this.HaltAttributes=false;
this.ContainerNames=Array();
this.Containers=Array();
this.MasterContainer=document.createElement("div");
this.MasterContainer.innerHTML="";
this.MasterContainer.setAttribute("id","ntbCalloutMasterContainer"+this.uid);
this.MasterContainer.object=this;
this.MasterContainer.style.position="absolute";
this.MasterContainer.style.top="0px";
this.MasterContainer.style.left="0px";
this.timerObject=null;
this.expireObj=null;
this.object=this;
this.absWidth=0;
this.absHeight=0;
this.zSpot=(nitobi.callout.Callout.refs.length*10)+1000000;
this.ondestroy=null;
this.onappear=null;
this.onScreenUpdate=null;
this.timeOut=-1;
this.x=0;
this.y=0;
this.ax=0;
this.ay=0;
this.width=0;
this.height=0;
this.MasterContainer.style.visibility="hidden";
this.MasterContainer.style.zIndex=this.zSpot.toString();
document.getElementsByTagName("body").item(0).appendChild(this.MasterContainer);
for(var t=0;t<6;t++){
this.ContainerNames[t]="ntbCalloutContainer"+t+"_"+this.uid;
this.Containers[t]=document.createElement("div");
this.Containers[t].innerHTML="";
this.Containers[t].setAttribute("id",this.ContainerNames[t]);
this.Containers[t].object=this;
this.MasterContainer.appendChild(this.Containers[t]);
this.Containers[t].style.position="absolute";
this.Containers[t].style.top="0px";
this.Containers[t].style.left="0px";
this.Containers[t].style.zIndex=this.zSpot.toString();
}
this.TitleElement="ntbCalloutTitle_"+this.uid;
this.TitleElement=document.createElement("div");
this.TitleElement.innerHTML="";
this.TitleElement.setAttribute("id","title"+this.uid);
this.TitleElement.object=this;
this.MasterContainer.appendChild(this.TitleElement);
this.TitleElement.style.position="absolute";
this.TitleElement.style.zIndex=(this.zSpot+1).toString();
this.TitleElement.style.visibility="visible";
this.TitleElement.style.display="block";
this.CloseElement="ntbCalloutClose_"+this.uid;
this.CloseElement=document.createElement("div");
this.CloseElement.innerHTML="";
this.CloseElement.setAttribute("id","close"+this.uid);
this.CloseElement.object=this;
this.MasterContainer.appendChild(this.CloseElement);
this.CloseElement.style.position="absolute";
this.CloseElement.style.zIndex=(this.zSpot+5).toString();
this.CloseElement.style.visibility="visible";
this.CloseElement.style.display="block";
this.CloseElement.className="ntb"+this.stylesheet+"Callout_close_off";
this.CloseElement.onmouseover=function(){
try{
var _6=this.className.replace("_off","_on");
this.className=_6;
}
catch(e){
}
};
this.CloseElement.onmouseout=function(){
try{
var _7=this.className.replace("_on","_off");
this.className=_7;
}
catch(e){
}
};
this.CloseElement.onmousedown=function(){
try{
var _8=this.className.replace("_on","_off");
this.className=_8;
}
catch(e){
}
};
var _9=this;
this.CloseElement.onmouseup=function(){
try{
var _a=this.className.replace("_off","_on");
this.className=_a;
}
catch(e){
}
_9.destroy();
return false;
};
this.CloseElement.onclick=function(){
return false;
};
this.BodyElement="ntbCalloutBody_"+this.uid;
this.BodyElement=document.createElement("div");
this.BodyElement.innerHTML="";
this.BodyElement.setAttribute("id","body"+this.uid);
this.BodyElement.object=this;
this.MasterContainer.appendChild(this.BodyElement);
this.BodyElement.style.position="absolute";
this.BodyElement.style.zIndex=(this.zSpot+4).toString();
this.BodyElement.style.visibility="visible";
this.BodyElement.style.display="block";
nitobi.callout.lastStyle=this.stylesheet;
this.StyleSheetUrl=nitobi.callout.Callout.getStyleSheetUrl();
this.setMode("INACTIVE");
this.CalloutMinWidth=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_minimums","width");
this.CalloutMinHeight=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_minimums","height");
this.CalloutContentWidth=200;
this.CalloutContentHeight=0;
if(this.CalloutContentWidth<this.CalloutMinWidth){
this.CalloutContentWidth=this.CalloutMinWidth;
}
if(this.CalloutContentHeight<this.CalloutMinHeight){
this.CalloutContentHeight=this.CalloutMinHeight;
}
this.CalloutDirection=0;
this.setCalloutDirection(1);
if(nitobi.callout.Callout.refs.length==1){
if(window.addEventListener){
window.addEventListener("scroll",nitobi.callout.Callout.update,false);
window.addEventListener("resize",nitobi.callout.Callout.update,false);
}else{
if(window.attachEvent){
window.attachEvent("onscroll",nitobi.callout.Callout.update);
window.attachEvent("onresize",nitobi.callout.Callout.update);
}
}
}
this.setTitle("");
this.bodyHTML="";
this.useBody=false;
this.setBody("");
if(_2!=null){
this.setTitle(_2);
}
if(_3!=null){
this.setBody(_3);
}
this.effectName="APPEAR";
this.opacity=1;
this.setEffect("FADE");
this.setOpacity(0);
};
nitobi.callout.Callout.styleArray=Array();
nitobi.callout.Callout.ruleArray=Array();
nitobi.callout.Callout.globalStylesheet;
nitobi.callout.Callout.precachedImages=Array();
nitobi.callout.Callout.refs=Array();
nitobi.callout.Callout.permHeight=0;
nitobi.callout.Callout.permWidth=0;
nitobi.callout.Callout.globalStyleSheetName="nitobi.attention.css";
nitobi.callout.Callout.rewriteId=function(_b){
try{
document.getElementById(_b).id=_b;
}
catch(e){
try{
for(var i=0;i<document.forms.length;i++){
for(var b=0;b<document.forms[i].elements.length;b++){
if(document.forms[i].elements[b].name.toUpperCase()==_b.toUpperCase()){
document.forms[i].elements[b].id=_b;
}
}
}
}
catch(e){
}
}
};
nitobi.callout.Callout.update=function(){
var t,o;
for(t=0;t<nitobi.callout.Callout.refs.length;t++){
o=nitobi.callout.Callout.refs[t];
clearTimeout(o.timerObject);
o.timerObject=setTimeout("nitobi.callout.Callout.refs["+t+"].updateCallout()",150);
}
};
nitobi.callout.destroyAll=function(){
var t,o;
for(t=0;t<nitobi.callout.Callout.refs.length;t++){
o=nitobi.callout.Callout.refs[t];
o.destroy();
}
};
nitobi.callout.destroyLast=function(){
var t,o;
for(t=0;t<nitobi.callout.Callout.refs.length;t++){
o=nitobi.callout.Callout.refs[t];
}
try{
o.destroy();
}
catch(e){
}
};
nitobi.callout.Callout.prototype.setOnScreenUpdate=function(_14){
this.onScreenUpdate=_14;
};
nitobi.callout.Callout.prototype.setOnDestroy=function(_15){
this.ondestroy=_15;
};
nitobi.callout.Callout.prototype.setOnAppear=function(_16){
this.onappear=_16;
};
nitobi.callout.Callout.prototype.setExpire=function(_17){
this.timeOut=_17;
var ds=this;
this.expireObj=setTimeout(function(){
ds.destroy();
},_17);
};
nitobi.callout.Callout.prototype.setSize=function(_19,_1a){
this.absWidth=_19;
this.absHeight=_1a;
this.setTitle(this.titlehtml);
};
nitobi.callout.Callout.prototype.getPosition=function(){
return {x:this.ax,y:this.ay};
};
nitobi.callout.Callout.prototype.setEffect=function(_1b){
this.effectName="FADE";
};
nitobi.callout.Callout.prototype.setTitle=function(_1c){
this.titlehtml=_1c;
if(_1c.length>0){
this.useTitle=true;
}else{
this.useTitle=false;
}
if(this.useTitle){
try{
this.TitleElement.style.visibility="visible";
this.TitleElement.className="ntb"+this.stylesheet+"Callout_titlediv"+this.CalloutDirection;
this.TitleElement.innerHTML=this.titlehtml;
if(this.CalloutContentWidth<this.TitleElement.offsetWidth+30){
this.CalloutContentWidth=this.TitleElement.offsetWidth+30;
}
this.setBody(this.bodyHTML);
}
catch(e){
}
}else{
this.TitleElement.style.visibility="visible";
this.TitleElement.innerHTML="&nbsp;";
}
if(!this.HaltAttributes){
this.assignAttributes();
}
};
nitobi.callout.Callout.prototype.setBody=function(_1d){
try{
this.bodyHTML=_1d;
var _1e=_1d.replace(/(<([^>]+)>)/ig,"");
var _1f=_1e.length;
if(_1d.length>0){
this.useBody=true;
}else{
this.useBody=false;
}
if(this.useBody){
this.BodyElement.style.visibility="visible";
if(this.CalloutContentWidth<((_1f/12)*nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_extender","width"))){
this.CalloutContentWidth=(_1f/12)*nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_extender","width");
}
this.BodyElement.style.width=this.CalloutContentWidth+"px";
this.BodyElement.className="ntb"+this.stylesheet+"Callout_bodydiv"+this.CalloutDirection;
this.BodyElement.innerHTML=_1d;
if(this.useTitle==false){
this.BodyElement.style.top=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_bodytitlediv"+this.CalloutDirection,"top")+"px";
this.BodyElement.style.left=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_bodytitlediv"+this.CalloutDirection,"left")+"px";
this.BodyElement.style.marginTop="";
this.CalloutContentHeight=this.BodyElement.offsetHeight+nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_bodytitlediv"+this.CalloutDirection,"top");
this.CalloutContentHeight-=parseInt(this.TitleElement.offsetHeight);
}else{
this.BodyElement.style.top="";
this.BodyElement.style.left="";
var _20=parseInt(nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_titleOffset","top"));
if(isNaN(_20)){
_20=0;
}
this.CalloutContentHeight=this.BodyElement.offsetHeight+parseInt(nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_bodytitlediv"+this.CalloutDirection,"top"))+_20;
}
}else{
this.BodyElement.style.visibility="hidden";
}
if((this.absWidth>0)||(this.absHeight>0)){
this.CalloutContentWidth=this.absWidth+nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_bodytitlediv"+this.CalloutDirection,"left");
this.CalloutContentHeight=this.absHeight+nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_bodytitlediv"+this.CalloutDirection,"top");
}
if(!this.HaltAttributes){
this.assignAttributes();
}
}
catch(e){
}
};
nitobi.callout.Callout.prototype.setCalloutDirection=function(_21){
var _22=this.titlehtml;
if(_21!=this.CalloutDirection){
this.CalloutDirection=_21;
this.setTitle(_22);
if(!this.HaltAttributes){
this.assignAttributes();
}
}
};
nitobi.callout.Callout.prototype.updateCallout=function(){
if(this.mode=="ATTACHELEMENT"){
this.attachToElement(this.lastID);
}
};
nitobi.callout.Callout.prototype.assignAttributes=function(_23){
var t,_25,_26,_27=0;
var _28,_29=0;
try{
for(t=0;t<6;t++){
this.Containers[t].style.display="none";
this.Containers[t].style.width="";
this.Containers[t].style.height="";
this.Containers[t].style.top="0px";
this.Containers[t].style.left="0px";
}
_28=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_offset"+this.CalloutDirection,"width");
_29=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_offset"+this.CalloutDirection,"height");
var _2a=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_closeoffset"+this.CalloutDirection,"left");
var _2b=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_closeoffset"+this.CalloutDirection,"top");
this.CalloutContentWidth+=_28;
this.CalloutContentHeight+=_29;
if(this.CalloutDirection==0){
for(t=0;t<4;t++){
this.Containers[t].style.display="block";
}
_25=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_bl_right","width");
_26=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_tl_br_plain","width");
this.width=_25+this.CalloutContentWidth;
this.height=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_tl_br_plain","height")+this.CalloutContentHeight;
this.MasterContainer.style.width=this.width;
this.MasterContainer.style.height=this.height;
this.Containers[0].className="ntb"+this.stylesheet+"Callout_bl_main";
this.Containers[0].style.top="0px";
this.Containers[0].style.width=this.CalloutContentWidth+"px";
this.Containers[0].style.height=this.CalloutContentHeight+"px";
this.swapIEPNG(0,"ntb"+this.stylesheet+"Callout_bl_main");
this.Containers[1].className="ntb"+this.stylesheet+"Callout_bl_right";
this.Containers[1].style.left=this.CalloutContentWidth+"px";
this.Containers[1].style.height=this.CalloutContentHeight+"px";
this.Containers[1].style.top="0px";
this.swapIEPNG(1,"ntb"+this.stylesheet+"Callout_bl_right");
this.Containers[2].className="ntb"+this.stylesheet+"Callout_bottom_plain";
this.Containers[2].style.left="0px";
this.Containers[2].style.width=(this.CalloutContentWidth+parseInt(_25)-parseInt(_26))+"px";
this.Containers[2].style.top=this.CalloutContentHeight+"px";
this.swapIEPNG(2,"ntb"+this.stylesheet+"Callout_bottom_plain");
this.Containers[3].className="ntb"+this.stylesheet+"Callout_tl_br_plain";
this.Containers[3].style.left=(this.CalloutContentWidth+parseInt(_25)-parseInt(_26))+"px";
this.Containers[3].style.top=this.CalloutContentHeight+"px";
this.swapIEPNG(3,"ntb"+this.stylesheet+"Callout_tl_br_plain");
this.CloseElement.style.left=(this.CalloutContentWidth+_2a)+"px";
this.CloseElement.style.top=_2b+"px";
}
if(this.CalloutDirection==1){
for(t=0;t<4;t++){
this.Containers[t].style.display="block";
}
_25=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_bl_right","width");
_26=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_br_bottom","width");
this.width=_25+this.CalloutContentWidth;
this.height=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_br_bottom","height")+this.CalloutContentHeight;
this.MasterContainer.style.width=this.width;
this.MasterContainer.style.height=this.height;
this.Containers[0].className="ntb"+this.stylesheet+"Callout_bl_main";
this.Containers[0].style.top="0px";
this.Containers[0].style.width=this.CalloutContentWidth+"px";
this.Containers[0].style.height=this.CalloutContentHeight+"px";
this.swapIEPNG(0,"ntb"+this.stylesheet+"Callout_bl_main");
this.Containers[1].className="ntb"+this.stylesheet+"Callout_bl_right";
this.Containers[1].style.left=this.CalloutContentWidth+"px";
this.Containers[1].style.height=this.CalloutContentHeight+"px";
this.Containers[1].style.top="0px";
this.swapIEPNG(1,"ntb"+this.stylesheet+"Callout_bl_right");
this.Containers[2].className="ntb"+this.stylesheet+"Callout_bottom_plain";
this.Containers[2].style.left="0px";
this.Containers[2].style.width=(this.CalloutContentWidth+parseInt(_25)-parseInt(_26))+"px";
this.Containers[2].style.top=this.CalloutContentHeight+"px";
this.swapIEPNG(2,"ntb"+this.stylesheet+"Callout_bottom_plain");
this.Containers[3].className="ntb"+this.stylesheet+"Callout_br_bottom";
this.Containers[3].style.left=(this.CalloutContentWidth+parseInt(_25)-parseInt(_26))+"px";
this.Containers[3].style.top=this.CalloutContentHeight+"px";
this.swapIEPNG(3,"ntb"+this.stylesheet+"Callout_br_bottom");
this.CloseElement.style.left=(this.CalloutContentWidth+_2a)+"px";
this.CloseElement.style.top=_2b+"px";
}
if(this.CalloutDirection==2){
for(t=0;t<4;t++){
this.Containers[t].style.display="block";
}
_25=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_bl_right","width");
_26=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_br_plain","width");
this.width=_25+this.CalloutContentWidth;
this.height=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_bl_bottom","height")+this.CalloutContentHeight;
this.MasterContainer.style.width=this.width;
this.MasterContainer.style.height=this.height;
this.Containers[0].className="ntb"+this.stylesheet+"Callout_bl_main";
this.Containers[0].style.width=this.CalloutContentWidth+"px";
this.Containers[0].style.height=this.CalloutContentHeight+"px";
this.swapIEPNG(0,"ntb"+this.stylesheet+"Callout_bl_main");
this.Containers[1].className="ntb"+this.stylesheet+"Callout_bl_right";
this.Containers[1].style.left=this.CalloutContentWidth+"px";
this.Containers[1].style.height=this.CalloutContentHeight+"px";
this.Containers[1].style.top="0px";
this.swapIEPNG(1,"ntb"+this.stylesheet+"Callout_bl_right");
this.Containers[2].className="ntb"+this.stylesheet+"Callout_bl_bottom";
this.Containers[2].style.left="0px";
this.Containers[2].style.width=(this.CalloutContentWidth+parseInt(_25)-parseInt(_26))+"px";
this.Containers[2].style.top=this.CalloutContentHeight+"px";
this.swapIEPNG(2,"ntb"+this.stylesheet+"Callout_bl_bottom");
this.Containers[3].className="ntb"+this.stylesheet+"Callout_br_plain";
this.Containers[3].style.left=(this.CalloutContentWidth+parseInt(_25)-parseInt(_26))+"px";
this.Containers[3].style.top=this.CalloutContentHeight+"px";
this.swapIEPNG(3,"ntb"+this.stylesheet+"Callout_br_plain");
this.CloseElement.style.left=(this.CalloutContentWidth+_2a)+"px";
this.CloseElement.style.top=_2b+"px";
}
if(this.CalloutDirection==3){
for(t=0;t<4;t++){
this.Containers[t].style.display="block";
}
_25=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_tl_right","width");
_26=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_br_plain","width");
this.width=_25+this.CalloutContentWidth;
this.height=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_bottom_plain","height")+this.CalloutContentHeight;
this.MasterContainer.style.width=this.width;
this.MasterContainer.style.height=this.height;
this.Containers[0].className="ntb"+this.stylesheet+"Callout_tl_main";
this.Containers[0].style.width=this.CalloutContentWidth+"px";
this.Containers[0].style.height=this.CalloutContentHeight+"px";
this.swapIEPNG(0,"ntb"+this.stylesheet+"Callout_tl_main");
this.Containers[1].className="ntb"+this.stylesheet+"Callout_tl_right";
this.Containers[1].style.left=this.CalloutContentWidth+"px";
this.Containers[1].style.height=this.CalloutContentHeight+"px";
this.Containers[1].style.top="0px";
this.swapIEPNG(1,"ntb"+this.stylesheet+"Callout_tl_right");
this.Containers[2].className="ntb"+this.stylesheet+"Callout_bottom_plain";
this.Containers[2].style.left="0px";
this.Containers[2].style.width=(this.CalloutContentWidth+parseInt(_25)-parseInt(_26))+"px";
this.Containers[2].style.top=this.CalloutContentHeight+"px";
this.swapIEPNG(2,"ntb"+this.stylesheet+"Callout_bottom_plain");
this.Containers[3].className="ntb"+this.stylesheet+"Callout_tl_br_plain";
this.Containers[3].style.left=(this.CalloutContentWidth+parseInt(_25)-parseInt(_26))+"px";
this.Containers[3].style.top=this.CalloutContentHeight+"px";
this.swapIEPNG(3,"ntb"+this.stylesheet+"Callout_tl_br_plain");
this.CloseElement.style.left=(this.CalloutContentWidth+_2a)+"px";
this.CloseElement.style.top=_2b+"px";
}
if(this.CalloutDirection==4){
for(t=0;t<6;t++){
this.Containers[t].style.display="block";
}
_25=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_tr_right","width");
_26=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_tr_topright","width");
_27=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_tr_topleft","height");
this.width=_25+this.CalloutContentWidth;
this.height=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_tr_topleft","height")+nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_bottom_plain","height")+this.CalloutContentHeight;
this.MasterContainer.style.width=this.width;
this.MasterContainer.style.height=this.height;
this.Containers[4].className="ntb"+this.stylesheet+"Callout_tr_topleft";
this.Containers[4].style.left="0px";
this.Containers[4].style.top="0px";
this.Containers[4].style.width=(this.CalloutContentWidth+parseInt(_25)-parseInt(_26))+"px";
this.swapIEPNG(4,"ntb"+this.stylesheet+"Callout_tr_topleft");
this.Containers[5].className="ntb"+this.stylesheet+"Callout_tr_topright";
this.Containers[5].style.left=(this.CalloutContentWidth+parseInt(_25)-parseInt(_26))+"px";
this.Containers[5].style.top="0px";
this.swapIEPNG(5,"ntb"+this.stylesheet+"Callout_tr_topright");
this.Containers[0].className="ntb"+this.stylesheet+"Callout_tr_mainpart";
this.Containers[0].style.top=_27+"px";
this.Containers[0].style.width=this.CalloutContentWidth+"px";
this.Containers[0].style.height=(this.CalloutContentHeight-_27)+"px";
this.swapIEPNG(0,"ntb"+this.stylesheet+"Callout_tr_mainpart");
_26=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_br_plain","width");
this.Containers[1].className="ntb"+this.stylesheet+"Callout_tr_right";
this.Containers[1].style.left=this.CalloutContentWidth+"px";
this.Containers[1].style.height=(this.CalloutContentHeight-_27)+"px";
this.Containers[1].style.top=_27+"px";
this.swapIEPNG(1,"ntb"+this.stylesheet+"Callout_tr_right");
this.Containers[2].className="ntb"+this.stylesheet+"Callout_bottom_plain";
this.Containers[2].style.left="0px";
this.Containers[2].style.width=(this.CalloutContentWidth+parseInt(_25)-parseInt(_26))+"px";
this.Containers[2].style.top=(this.CalloutContentHeight-_27)+_27+"px";
this.swapIEPNG(2,"ntb"+this.stylesheet+"Callout_bottom_plain");
this.Containers[3].className="ntb"+this.stylesheet+"Callout_tl_br_plain";
this.Containers[3].style.left=(this.CalloutContentWidth+parseInt(_25)-parseInt(_26))+"px";
this.Containers[3].style.top=(this.CalloutContentHeight-_27)+_27+"px";
this.swapIEPNG(3,"ntb"+this.stylesheet+"Callout_tl_br_plain");
this.CloseElement.style.left=(this.CalloutContentWidth+_2a)+"px";
this.CloseElement.style.top=_2b+"px";
}
if(this.CalloutDirection==5){
for(t=0;t<4;t++){
this.Containers[t].style.display="block";
}
_25=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_lt_br","height");
_26=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_lt_bottom","height");
this.width=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_lt_right","width")+this.CalloutContentWidth;
this.height=_26+this.CalloutContentHeight;
this.MasterContainer.style.width=this.width;
this.MasterContainer.style.height=this.height;
this.Containers[0].className="ntb"+this.stylesheet+"Callout_lt_main";
this.Containers[0].style.width=this.CalloutContentWidth+"px";
this.Containers[0].style.height=this.CalloutContentHeight+"px";
this.swapIEPNG(0,"ntb"+this.stylesheet+"Callout_lt_main");
this.Containers[1].className="ntb"+this.stylesheet+"Callout_lt_bottom";
this.Containers[1].style.left="0px";
this.Containers[1].style.width=this.CalloutContentWidth+"px";
this.Containers[1].style.top=this.CalloutContentHeight+"px";
this.swapIEPNG(1,"ntb"+this.stylesheet+"Callout_lt_bottom");
this.Containers[2].className="ntb"+this.stylesheet+"Callout_lt_right";
this.Containers[2].style.left=this.CalloutContentWidth+"px";
this.Containers[2].style.height=(this.CalloutContentHeight+_26-_25)+"px";
this.Containers[2].style.top="0px";
this.swapIEPNG(2,"ntb"+this.stylesheet+"Callout_lt_right");
this.Containers[3].className="ntb"+this.stylesheet+"Callout_lt_br";
this.Containers[3].style.left=(this.CalloutContentWidth)+"px";
this.Containers[3].style.top=(this.CalloutContentHeight+_26-_25)+"px";
this.swapIEPNG(3,"ntb"+this.stylesheet+"Callout_lt_br");
this.CloseElement.style.left=(this.CalloutContentWidth+_2a)+"px";
this.CloseElement.style.top=_2b+"px";
}
if(this.CalloutDirection==6){
for(t=0;t<6;t++){
this.Containers[t].style.display="block";
}
_25=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_lb_left","width");
_26=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_lb_lb","height");
_27=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_lb_bottom","height");
this.width=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_lb_right","width")+_25+this.CalloutContentWidth;
this.height=_27+this.CalloutContentHeight;
this.MasterContainer.style.width=this.width;
this.MasterContainer.style.height=this.height;
this.Containers[4].className="ntb"+this.stylesheet+"Callout_lb_left";
this.Containers[4].style.left="0px";
this.Containers[4].style.top="0px";
this.Containers[4].style.height=(this.CalloutContentHeight+_27-_26)+"px";
this.swapIEPNG(4,"ntb"+this.stylesheet+"Callout_lb_left");
this.Containers[5].className="ntb"+this.stylesheet+"Callout_lb_lb";
this.Containers[5].style.left="0px";
this.Containers[5].style.top=(this.CalloutContentHeight+_27-_26)+"px";
this.swapIEPNG(5,"ntb"+this.stylesheet+"Callout_lb_lb");
this.Containers[0].className="ntb"+this.stylesheet+"Callout_lb_main";
this.Containers[0].style.top="0px";
this.Containers[0].style.left=_25+"px";
this.Containers[0].style.width=this.CalloutContentWidth+"px";
this.Containers[0].style.height=this.CalloutContentHeight+"px";
this.swapIEPNG(0,"ntb"+this.stylesheet+"Callout_lb_main");
this.Containers[1].className="ntb"+this.stylesheet+"Callout_lb_bottom";
this.Containers[1].style.left=_25+"px";
this.Containers[1].style.width=this.CalloutContentWidth+"px";
this.Containers[1].style.top=this.CalloutContentHeight+"px";
this.swapIEPNG(1,"ntb"+this.stylesheet+"Callout_lb_bottom");
_26=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_lb_br","height");
this.Containers[2].className="ntb"+this.stylesheet+"Callout_lb_right";
this.Containers[2].style.left=(_25+this.CalloutContentWidth)+"px";
this.Containers[2].style.top="0px";
this.Containers[2].style.height=(this.CalloutContentHeight+_27-_26)+"px";
this.swapIEPNG(2,"ntb"+this.stylesheet+"Callout_lb_right");
this.Containers[3].className="ntb"+this.stylesheet+"Callout_lb_br";
this.Containers[3].style.left=(_25+this.CalloutContentWidth)+"px";
this.Containers[3].style.top=(this.CalloutContentHeight+_27-_26)+"px";
this.swapIEPNG(3,"ntb"+this.stylesheet+"Callout_lb_br");
this.CloseElement.style.left=(this.CalloutContentWidth+_2a)+"px";
this.CloseElement.style.top=_2b+"px";
}
if(this.CalloutDirection==7){
for(t=0;t<4;t++){
this.Containers[t].style.display="block";
}
_25=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_rb_bottom","height");
_26=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_rt_br","height");
this.width=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_rt_right","width")+this.CalloutContentWidth;
this.height=_26+this.CalloutContentHeight;
this.MasterContainer.style.width=this.width;
this.MasterContainer.style.height=this.height;
this.Containers[0].className="ntb"+this.stylesheet+"Callout_rb_main";
this.Containers[0].style.width=this.CalloutContentWidth+"px";
this.Containers[0].style.height=this.CalloutContentHeight+"px";
this.swapIEPNG(0,"ntb"+this.stylesheet+"Callout_rb_main");
this.Containers[1].className="ntb"+this.stylesheet+"Callout_rt_right";
this.Containers[1].style.left=this.CalloutContentWidth+"px";
this.Containers[1].style.height=(this.CalloutContentHeight+_25-_26)+"px";
this.Containers[1].style.top="0px";
this.swapIEPNG(1,"ntb"+this.stylesheet+"Callout_rt_right");
this.Containers[2].className="ntb"+this.stylesheet+"Callout_rb_bottom";
this.Containers[2].style.left="0px";
this.Containers[2].style.width=this.CalloutContentWidth+"px";
this.Containers[2].style.top=this.CalloutContentHeight+"px";
this.swapIEPNG(2,"ntb"+this.stylesheet+"Callout_rb_bottom");
this.Containers[3].className="ntb"+this.stylesheet+"Callout_rt_br";
this.Containers[3].style.left=this.CalloutContentWidth+"px";
this.Containers[3].style.top=(this.CalloutContentHeight+_25-_26)+"px";
this.swapIEPNG(3,"ntb"+this.stylesheet+"Callout_rt_br");
this.CloseElement.style.left=(this.CalloutContentWidth+_2a)+"px";
this.CloseElement.style.top=_2b+"px";
}
if(this.CalloutDirection==8){
for(t=0;t<4;t++){
this.Containers[t].style.display="block";
}
_25=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_rb_bottom","height");
_26=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_rb_rb","height");
this.width=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_rb_right","width")+this.CalloutContentWidth;
this.height=_26+this.CalloutContentHeight;
this.MasterContainer.style.width=this.width;
this.MasterContainer.style.height=this.height;
this.Containers[0].className="ntb"+this.stylesheet+"Callout_rb_main";
this.Containers[0].style.width=this.CalloutContentWidth+"px";
this.Containers[0].style.height=this.CalloutContentHeight+"px";
this.swapIEPNG(0,"ntb"+this.stylesheet+"Callout_rb_main");
this.Containers[1].className="ntb"+this.stylesheet+"Callout_rb_right";
this.Containers[1].style.left=this.CalloutContentWidth+"px";
this.Containers[1].style.height=(this.CalloutContentHeight+_25-_26)+"px";
this.Containers[1].style.top="0px";
this.swapIEPNG(1,"ntb"+this.stylesheet+"Callout_rb_right");
this.Containers[2].className="ntb"+this.stylesheet+"Callout_rb_bottom";
this.Containers[2].style.left="0px";
this.Containers[2].style.width=this.CalloutContentWidth+"px";
this.Containers[2].style.top=this.CalloutContentHeight+"px";
this.swapIEPNG(2,"ntb"+this.stylesheet+"Callout_rb_bottom");
this.Containers[3].className="ntb"+this.stylesheet+"Callout_rb_rb";
this.Containers[3].style.left=this.CalloutContentWidth+"px";
this.Containers[3].style.top=(this.CalloutContentHeight+_25-_26)+"px";
this.swapIEPNG(3,"ntb"+this.stylesheet+"Callout_rb_rb");
this.CloseElement.style.left=(this.CalloutContentWidth+_2a)+"px";
this.CloseElement.style.top=_2b+"px";
}
this.CalloutContentWidth-=_28;
this.CalloutContentHeight-=_29;
this.moveTo(this.ax,this.ay);
}
catch(e){
}
};
nitobi.callout.Callout.prototype.swapIEPNG=function(_2c,_2d){
this.Is();
if((this.ie)&&(!this.ie7)){
this.Containers[_2c].style.backgroundImage="none";
this.Containers[_2c].style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.StyleSheetUrl+nitobi.callout.Callout.readClassAttribute(_2d,"backgroundImage")+"', sizingMethod='crop');";
}else{
this.Containers[_2c].style.filter="";
}
};
nitobi.callout.Callout.prototype.setOpacity=function(_2e){
this.opacity=_2e;
var _2f=false;
if(this.ie7){
if(_2e==0){
this.BodyElement.style.opacity=0;
this.BodyElement.style.filter="alpha(opacity=0)";
this.CloseElement.style.opacity=0;
this.CloseElement.style.filter="alpha(opacity=0)";
}else{
_2f=true;
}
}
try{
if(_2e==1){
this.MasterContainer.style.filter="";
this.MasterContainer.style.opacity=_2e;
}else{
this.MasterContainer.style.opacity=this.opacity;
this.MasterContainer.style.filter="alpha(opacity="+(this.opacity*100)+")";
this.BodyElement.style.opacity=this.opacity;
this.BodyElement.style.filter="alpha(opacity="+(this.opacity*100)+")";
this.CloseElement.style.opacity=this.opacity;
this.CloseElement.style.filter="alpha(opacity="+(this.opacity*100)+")";
}
}
catch(e){
}
if(_2f){
try{
this.MasterContainer.style.filter="";
}
catch(e){
}
}
};
nitobi.callout.Callout.prototype.fadeIn=function(){
if(!this.ie7){
var _30=this;
var _31=this.opacity+0.1;
if(_31>1){
_31=1;
}
if(this.opacity<0.95){
this.setOpacity(_31);
setTimeout(function(){
_30.fadeIn();
},50);
}else{
this.setOpacity(1);
if(this.onappear!=null){
this.onappear.call();
}
}
}else{
this.setOpacity(0.99);
this.setOpacity(1);
if(this.onappear!=null){
this.onappear.call();
}
}
};
nitobi.callout.Callout.prototype.fadeOut=function(_32){
if(!this.ie7){
var _33=this;
var _34=this.opacity-0.1;
if(_34<0){
_34=0;
}
if(this.opacity>0.05){
this.setOpacity(_34);
setTimeout(function(){
_33.fadeOut(_32);
},50);
}else{
this.setOpacity(0);
eval(_32);
}
}else{
this.setOpacity(0);
eval(_32);
}
};
nitobi.callout.Callout.prototype.show=function(){
if(this.effectName=="APPEAR"){
this.MasterContainer.style.visibility="visible";
if(this.onappear!=null){
this.onappear.call();
}
}
if(this.effectName=="FADE"){
try{
this.MasterContainer.style.visibility="visible";
this.setOpacity(0);
this.fadeIn();
}
catch(e){
}
}
if(this.mode=="ATTACHELEMENT"){
this.attachToElement(this.lastID);
}
};
nitobi.callout.Callout.prototype.hide=function(){
if(this.effectName=="APPEAR"){
this.MasterContainer.style.visibility="hidden";
}
if(this.effectName=="FADE"){
this.fadeOut();
}
};
nitobi.callout.Callout.getStyleSheetUrl=function(){
if(nitobi.callout.Callout.globalStylesheet==null){
var _35=nitobi.html.Css.getRule("ntb"+nitobi.callout.lastStyle);
nitobi.callout.Callout.globalStylesheet=nitobi.html.Css.getPath(_35.parentStyleSheet);
return nitobi.callout.Callout.globalStylesheet;
}else{
return nitobi.callout.Callout.globalStylesheet;
}
};
nitobi.callout.Callout.prototype.setMode=function(_36){
if(this.mode!=_36){
this.mode=_36;
}
};
nitobi.callout.Callout.prototype._destroy=function(){
try{
this.MasterContainer.style.display="none";
for(var t=0;t<6;t++){
this.Containers[t].parentNode.removeChild(this.Containers[t]);
this.Containers[t]=null;
}
this.MasterContainer.parentNode.removeChild(this.MasterContainer);
this.TitleElement.parentNode.removeChild(this.TitleElement);
this.TitleElement=null;
this.CloseElement.parentNode.removeChild(this.CloseElement);
this.CloseElement=null;
this.MasterContainer=null;
}
catch(e){
}
this.setMode("INACTIVE");
var _38=false;
for(var t=0;t<nitobi.callout.Callout.refs.length;t++){
if(nitobi.callout.Callout.refs[t].uid!=null){
_38=true;
}
}
if(_38==false){
if(window.addEventListener){
window.removeEventListener("scroll",nitobi.callout.Callout.update,false);
window.removeEventListener("resize",nitobi.callout.Callout.update,false);
}else{
if(window.attachEvent){
window.detachEvent("onscroll",nitobi.callout.Callout.update);
window.detachEvent("onresize",nitobi.callout.Callout.update);
}
}
nitobi.callout.Callout.refs.length=0;
}
this.BodyElement=null;
try{
document.getElementById("body"+this.uid).parentNode.removeChild(document.getElementById("body"+this.uid));
}
catch(e){
}
this.uid=null;
if(this.ondestroy!=null){
this.ondestroy.call();
this.ondestroy=null;
}
for(var _39 in this){
this[_39]=null;
delete this[_39];
}
};
nitobi.callout.Callout.prototype.destroy=function(){
clearTimeout(this.expireObj);
if(this.effectName=="APPEAR"){
this._destroy();
}
if(this.effectName=="FADE"){
this.fadeOut("this._destroy();");
}
};
nitobi.callout.Callout.readClassAttribute=function(_3a,_3b){
var b,c,d,e;
e=nitobi.callout.Callout.styleArray[_3a+_3b];
if(typeof (e)=="undefined"){
if(typeof (nitobi.callout.Callout.ruleArray[_3a])=="undefined"){
var _40=nitobi.html.Css.getRule(_3a);
nitobi.callout.Callout.ruleArray[_3a]=_40;
}else{
var _40=nitobi.callout.Callout.ruleArray[_3a];
}
if(_40&&_40.selectorText.toLowerCase().indexOf(_3a.toLowerCase())>-1){
if(_3b.toLowerCase()=="backgroundimage"){
nitobi.callout.Callout.styleArray[_3a+_3b]=_40.style.backgroundImage.replace("url","").replace("(","").replace(")","");
return nitobi.callout.Callout.styleArray[_3a+_3b];
}
if(_3b.toLowerCase()=="width"){
nitobi.callout.Callout.styleArray[_3a+_3b]=parseInt(_40.style.width.replace("px",""));
return nitobi.callout.Callout.styleArray[_3a+_3b];
}
if(_3b.toLowerCase()=="height"){
nitobi.callout.Callout.styleArray[_3a+_3b]=parseInt(_40.style.height.replace("px",""));
return nitobi.callout.Callout.styleArray[_3a+_3b];
}
if(_3b.toLowerCase()=="left"){
nitobi.callout.Callout.styleArray[_3a+_3b]=parseInt(_40.style.left.replace("px",""));
return nitobi.callout.Callout.styleArray[_3a+_3b];
}
if(_3b.toLowerCase()=="top"){
nitobi.callout.Callout.styleArray[_3a+_3b]=parseInt(_40.style.top.replace("px",""));
return nitobi.callout.Callout.styleArray[_3a+_3b];
}
}
}else{
return nitobi.callout.Callout.styleArray[_3a+_3b];
}
};
nitobi.callout.Callout.getCoords=function(_41){
var ew,eh;
if(_41==null){
var lx,ly=0;
var cc=nitobi.callout.Callout.getScrollPosition();
lx=cc.scrollLeft+(cc.clientWidth/2);
ly=cc.scrollTop+(cc.clientHeight/2);
ew=10;
eh=10;
}else{
try{
var _47=_41;
ew=_41.offsetWidth;
eh=_41.offsetHeight;
for(var lx=0,ly=0;_41!=null;lx+=_41.offsetLeft,ly+=_41.offsetTop,_41=_41.offsetParent){
}
for(;_47!=document.body;lx-=_47.scrollLeft,ly-=_47.scrollTop,_47=_47.parentNode){
}
}
catch(e){
}
}
return {x:lx,y:ly,h:eh,w:ew};
};
nitobi.callout.Callout.getCoordsAlt=function(_48){
if(!_48&&this){
_48=this;
}
try{
var _49=_48.offsetLeft;
var _4a=_48.offsetTop;
var _4b=_48.offsetParent;
}
catch(e){
}
while(_4b!=null){
try{
_49+=_4b.offsetLeft;
_4a+=_4b.offsetTop;
_4b=_4b.offsetParent;
}
catch(e){
}
}
var myh=_48.offsetHeight;
var myw=_48.offsetWidth;
if(_48==null){
var _49,_4a=0;
var cc=nitobi.callout.Callout.getScrollPosition();
_49=cc.scrollLeft+(cc.clientWidth/2);
_4a=cc.scrollTop+(cc.clientHeight/2);
myh=0;
myw=0;
}
return {x:_49,y:_4a,h:myh,w:myw};
};
nitobi.callout.Callout.prototype.getXY=function(){
return {x:this.ax,y:this.ay};
};
nitobi.callout.Callout.prototype.moveTo=function(x,y){
x=parseFloat(x);
y=parseFloat(y);
this.ax=x;
this.ay=y;
var _51=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_offset"+this.CalloutDirection,"left");
var _52=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_offset"+this.CalloutDirection,"top");
try{
if(this.CalloutDirection==0){
this.MasterContainer.style.top=(y-this.height/2)+"px";
this.MasterContainer.style.left=(x-this.width/2)+"px";
}
if(this.CalloutDirection==1){
this.MasterContainer.style.top=(y-this.height+_52)+"px";
this.MasterContainer.style.left=(x-this.width+_51)+"px";
}
if(this.CalloutDirection==2){
this.MasterContainer.style.top=(y-this.height+_52)+"px";
this.MasterContainer.style.left=(x+_51)+"px";
}
if(this.CalloutDirection==3){
this.MasterContainer.style.top=(y+_52)+"px";
this.MasterContainer.style.left=(x+_51)+"px";
}
if(this.CalloutDirection==4){
this.MasterContainer.style.top=(y+_52)+"px";
this.MasterContainer.style.left=(x-this.width+_51)+"px";
}
if(this.CalloutDirection==5){
this.MasterContainer.style.top=(y+_52)+"px";
this.MasterContainer.style.left=(x+_51)+"px";
}
if(this.CalloutDirection==6){
this.MasterContainer.style.top=(y-this.height+_52)+"px";
this.MasterContainer.style.left=(x+_51)+"px";
}
if(this.CalloutDirection==7){
this.MasterContainer.style.top=(y+_52)+"px";
this.MasterContainer.style.left=(x-this.width+_51)+"px";
}
if(this.CalloutDirection==8){
this.MasterContainer.style.top=(y-this.height+_52)+"px";
this.MasterContainer.style.left=(x-this.width+_51)+"px";
}
}
catch(e){
}
if(this.allowOffScreen==false){
try{
if(parseInt(this.MasterContainer.style.top.replace("px",""))<0){
this.MasterContainer.style.top="0px";
}
if(parseInt(this.MasterContainer.style.left.replace("px",""))<0){
this.MasterContainer.style.left="0px";
}
}
catch(e){
}
}
};
nitobi.callout.Callout.getScrollPosition=function(){
var _53,_54,_55,_56=0;
if((this.opera==false)&&(document.documentElement.scrollTop>0)){
_53=document.documentElement.scrollTop;
_54=document.documentElement.scrollLeft;
_55=document.documentElement.clientWidth;
_56=document.documentElement.clientHeight;
}else{
_53=document.body.scrollTop;
_54=document.body.scrollLeft;
_55=document.body.clientWidth;
_56=document.body.clientHeight;
}
if((document.body.clientHeight>0)&&(document.documentElement.clientHeight>0)&&(document.body.clientHeight<document.documentElement.clientHeight)){
_55=document.body.clientWidth;
_56=document.body.clientHeight;
}
if((document.body.clientHeight>0)&&(document.documentElement.clientHeight>0)&&(document.body.clientHeight>document.documentElement.clientHeight)){
_55=document.documentElement.clientWidth;
_56=document.documentElement.clientHeight;
}
if((nitobi.callout.Callout.permHeight==0)||(nitobi.callout.Callout.permWidth==0)){
var _57=navigator.userAgent.toLowerCase();
if(_57.indexOf("opera")==0){
var _58=true;
}
var ie=false;
if(_57.indexOf("ie")>0){
ie=true;
}
var _5a=document.createElement("div");
_5a.innerHTML="";
_5a.setAttribute("id","ntbHeightDiv");
_5a.object=this;
_5a.style.position="relative";
_5a.style.width="100%";
_5a.style.height="1px";
_5a.style.visibility="visible";
document.getElementsByTagName("body").item(0).appendChild(_5a);
var _5b;
if(_58){
_5b=nitobi.callout.Callout.getCoordsAlt(_5a);
}else{
_5b=nitobi.callout.Callout.getCoords(_5a);
}
nitobi.callout.Callout.permHeight=parseInt(_5b.y);
nitobi.callout.Callout.permWidth=parseInt(_5b.w)+(parseInt(_5b.x)*2);
if(nitobi.callout.Callout.permHeight<_56){
nitobi.callout.Callout.permHeight=_56;
}
if(nitobi.callout.Callout.permHeight<document.body.clientHeight){
nitobi.callout.Callout.permHeight=document.body.clientHeight;
}
if(nitobi.callout.Callout.permHeight<document.documentElement.clientHeight){
nitobi.callout.Callout.permHeight=document.documentElement.clientHeight;
}
document.getElementsByTagName("body").item(0).removeChild(_5a);
_5a=null;
_57=null;
_58=null;
}
if(((_53==0)&&(document.documentElement.scrollTop>0))||((_54==0)&&(document.documentElement.scrollLeft>0))){
_53=document.documentElement.scrollTop;
_54=document.documentElement.scrollLeft;
}
if((document.documentElement.scrollWidth>nitobi.callout.Callout.permWidth)||(document.documentElement.scrollHeight>nitobi.callout.Callout.permHeight)){
nitobi.callout.Callout.permWidth=document.documentElement.scrollWidth;
nitobi.callout.Callout.permHeight=document.documentElement.scrollHeight;
}
if((document.body.scrollWidth>nitobi.callout.Callout.permWidth)||(document.body.scrollHeight>nitobi.callout.Callout.permHeight)){
nitobi.callout.Callout.permWidth=document.body.scrollWidth;
nitobi.callout.Callout.permHeight=document.body.scrollHeight;
}
return {scrollLeft:_54,scrollTop:_53,clientWidth:_55,clientHeight:_56,bodyWidth:nitobi.callout.Callout.permWidth,bodyHeight:nitobi.callout.Callout.permHeight};
};
nitobi.callout.Callout.prototype.attachToElement=function(_5c){
this.assignAttributes();
if(typeof (_5c)=="function"){
try{
_5c=_5c.call();
}
catch(e){
}
}
var sP=nitobi.callout.Callout.getScrollPosition();
this.setMode("ATTACHELEMENT");
this.lastID=_5c;
var _5e;
var x;
nitobi.callout.Callout.rewriteId(_5c);
if(this.opera){
_5e=nitobi.callout.Callout.getCoordsAlt(document.getElementById(_5c));
}else{
_5e=nitobi.callout.Callout.getCoords(document.getElementById(_5c));
}
var _60=this.CalloutDirection;
var _61=Array(9);
for(c=1;c<9;c++){
_61[c]=true;
}
var _62=this.height*1;
var _63=this.width*1;
var _64=(_5e.h/2);
var _65=(_5e.w/2);
if((_5e.y-_62)<sP.scrollTop){
_61[1]=false;
_61[2]=false;
}
if((_5e.x-_63)<sP.scrollLeft){
_61[7]=false;
_61[8]=false;
}
if((_5e.y+_5e.h+_62)>(sP.scrollTop+sP.clientHeight)){
_61[3]=false;
_61[4]=false;
}
if((_5e.x+_5e.w+_63)>(sP.scrollLeft+sP.clientWidth)){
_61[5]=false;
_61[6]=false;
}
if((_5e.x-_63+_65)<sP.scrollLeft){
_61[1]=false;
_61[4]=false;
}
if((_5e.x+_63+_65)>(sP.scrollLeft+sP.clientWidth)){
_61[2]=false;
_61[3]=false;
}
if((_5e.y-_62+_64)<sP.scrollTop){
_61[6]=false;
_61[8]=false;
}
if((_5e.y+_62+_64)>(sP.scrollTop+sP.clientHeight)){
_61[5]=false;
_61[7]=false;
}
for(c=1;c<9;c++){
if(_61[c]){
_60=c;
break;
}
}
if((_60==1)||(_60==2)||(_60==3)||(_60==4)){
_5e.x+=_65;
}
if((_60==3)||(_60==4)){
_5e.y+=_5e.h;
}
if((_60==5)||(_60==6)){
_5e.x+=_5e.w;
}
if((_60==5)||(_60==6)||(_60==7)||(_60==8)){
_5e.y+=_64;
}
var _66=false;
if(_60!=this.CalloutDirection){
this.CalloutDirection=_60;
if(this.firefox){
_66=true;
try{
this.MasterContainer.style.visibility="hidden";
}
catch(e){
_66=false;
}
}
try{
this.HaltAttributes=true;
var _67=this.titlehtml;
this.setTitle(_67);
var _68=this.bodyHTML;
this.setBody(_68);
this.HaltAttributes=false;
this.assignAttributes();
}
catch(e){
}
}
this.allowOffScreen=false;
this.moveTo(_5e.x,_5e.y);
if(_66){
var gfd=this;
setTimeout(function(){
gfd.MasterContainer.style.visibility="visible";
},5);
}
if(this.onScreenUpdate!=null){
this.onScreenUpdate.call();
}
};
nitobi.callout.Callout.precacheImages=function(){
var _6a=false;
var _6b=navigator.userAgent.toLowerCase();
if(_6b.indexOf("opera")>-1){
_6a=true;
}else{
var b,c,d;
var _6f=nitobi.html.Css.getStyleSheetsByName("nitobi.callout.css");
for(var i=0;i<_6f.length;i++){
nitobi.html.Css.precacheImages(_6f[i]);
}
}
};
nitobi.lang.defineNs("nitobi.callout");
nitobi.callout.Hint=function(_71,_72,_73,_74){
this.uid=Math.random().toString().replace(".","").replace("0","");
this.ver="0.9";
this.activeHints=Array();
this.timerObj=null;
this.timerLength=1000;
if(_71!=null){
this.timerLength=_71;
}
this.showOnMouseDown=_74!=false;
if(_72!=null){
this.expireTimeout=_72;
}
this.stylesheet="xp";
if(_73!=null){
this.stylesheet=_73;
}
};
nitobi.callout.Hint.prototype.runHint=function(_75,_76,_77){
var ff=this;
clearTimeout(this.timerObj);
if(this.activeHints[_75]!=true){
this.timerObj=setTimeout(function(){
ff.execHint(_75,_76,_77);
},this.timerLength);
}
};
nitobi.callout.Hint.prototype.execHint=function(_79,_7a,_7b){
var _7c=0;
var _7d=this;
if(this.activeHints[_79]!=true){
this.activeHints[_79]=true;
var _7e=new nitobi.callout.Callout(this.stylesheet);
_7e.attachToElement(_79);
_7e.setTitle(_7a);
_7e.setBody(_7b);
if(this.expireTimeout!=null){
_7c=this.expireTimeout;
}else{
_7c=3000+(_7b.split(" ").length*220);
}
_7e.setExpire(_7c);
_7e.ondestroy=function(){
_7d.activeHints[_79]=false;
};
_7e.show();
_7e=null;
}
};
nitobi.callout.Hint.prototype.addHint=function(_7f,_80,_81){
var abd=this;
try{
document.getElementById(_7f).onmouseover=function(){
abd.runHint(this.id,_80,_81);
};
document.getElementById(_7f).onmouseout=function(){
clearTimeout(abd.timerObj);
};
if(this.showOnMouseDown){
document.getElementById(_7f).onmousedown=function(){
abd.execHint(this.id,_80,_81);
};
}
document.getElementById(_7f).id=_7f;
}
catch(e){
for(var i=0;i<document.forms.length;i++){
for(var b=0;b<document.forms[i].elements.length;b++){
if(document.forms[i].elements[b].name.toUpperCase()==_7f.toUpperCase()){
document.forms[i].elements[b].onmouseover=function(){
abd.runHint(this.id,_80,_81);
};
document.forms[i].elements[b].onmouseout=function(){
clearTimeout(abd.timerObj);
};
if(this.showOnMouseDown){
document.forms[i].elements[b].onmousedown=function(){
abd.execHint(this.id,_80,_81);
};
}
document.forms[i].elements[b].id=_7f;
}
}
}
}
};


